/*
 * @Date         : 2022-06-10 10:15:54
 * @LastEditors  : zu1662
 * @LastEditTime : 2022-06-14 14:54:10
 * @Description  : 用户更新数据对象
 * 
 * Copyright © 2022 by zu1662, All Rights Reserved. 
 */
import { Type } from "class-transformer";
import { IsString, MaxLength, IsOptional } from "class-validator";

export class UserUpdateDto {
  @IsString()
  @IsOptional()
  @MaxLength(500)
  @Type(() => String)
  readonly avatar: string;

  @IsString()
  @IsOptional()
  @MaxLength(30)
  @Type(() => String)
  readonly name: string;

  @IsString()
  @IsOptional()
  @Type(() => String)
  readonly role: 'admin' | 'visitor';

  @IsString()
  @IsOptional()
  @Type(() => String)
  readonly status: 'locked' | 'active';
}
